package ooday02;

public class InterfaceDemo {
    public static void main(String[] args) {


    }
}

//演示接口的语法:
interface Inter{
    abstract void show();
    void test();//默认有abstract
}

//演示接口的实现:
class InterImpl implements Inter{
    @Override
    public void show() {//重写接口中的方法时，必须加public

    }
    @Override
    public void test() {

    }
}

//演示接口的多实现:
interface Inter1{
    void show();
}

interface Inter2{
    void test();
}

abstract class Eoo{
    abstract void say();
}

class Foo extends Eoo implements Inter1,Inter2{
    @Override
    public void show() {

    }

    @Override
    public void test() {

    }

    @Override
    void say() {

    }
}


//演示接口继承接口:
interface Inter3 {
    void test();
}

interface Inter4 extends Inter3{
    void show();
}

class Goo implements Inter4{
    @Override
    public void show() {

    }

    @Override
    public void test() {

    }
}














